using System;
using System.Data;
using System.Collections;
using APP.QUANLY.Common;

namespace RMAS.DAL
{
    /// <summary>
    /// Summary description for CONFIGINFO.
    /// </summary>
    public class CONFIGINFO
    {
              private Int32 _ID;
      private string _Name;
      private string _Note;
      private string _Value;
      private bool _IsUse;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
	      public bool IsSetID; 
      public bool IsIDNullable   
      { 
	 get { return false;  } 
      }
      public Int32 ID
      {
         get { return _ID; }
         set 
	    { 
 		 _ID = value;
		IsSetID = true;
 	    }
      }
    public bool IsSetName; 
    public bool IsNameNullable   
    { 
		get { return false;  } 
    }
    public string Name
    {
        get{ return _Name;  }
        set
		{
			_Name = value;
			IsSetName = true;
		}
    }
    public bool IsSetNote; 
    public bool IsNoteNullable   
    { 
		get { return false;  } 
    }
    public string Note
    {
        get{ return _Note;  }
        set
		{
			_Note = value;
			IsSetNote = true;
		}
    }
    public bool IsSetValue; 
    public bool IsValueNullable   
    { 
		get { return false;  } 
    }
    public string Value
    {
        get{ return _Value;  }
        set
		{
			_Value = value;
			IsSetValue = true;
		}
    }
    public bool IsSetIsUse; 
    public bool IsIsUseNullable   
    { 
		get { return false;  } 
    }
    public bool IsUse
    {
        get{ return _IsUse;  }
        set
		{
			_IsUse = value;
			IsSetIsUse = true;
		}
    }

        #endregion

        #region Constructors
        public CONFIGINFO()
        {
            Reset();
        }
        public CONFIGINFO(CONFIGINFO obj)
        {
            	this._ID = obj.ID;
	this._Name = obj.Name;
	this._Note = obj.Note;
	this._Value = obj.Value;
	this._IsUse = obj.IsUse;
        }
        #endregion

        public void Reset()
        {
                     _ID = EmptyValues.v_Int32;
         _Name = EmptyValues.v_string;
         _Note = EmptyValues.v_string;
         _Value = EmptyValues.v_string;
         _IsUse = EmptyValues.v_bool;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["ID"] is DBNull))
		{
			obj.ID = (Int32)reader["ID"];
		}
                if(!(reader["Name"] is DBNull))
		{
			obj.Name = (string)reader["Name"];
		}
                if(!(reader["Note"] is DBNull))
		{
			obj.Note = (string)reader["Note"];
		}
                if(!(reader["Value"] is DBNull))
		{
			obj.Value = (string)reader["Value"];
		}
                if(!(reader["IsUse"] is DBNull))
		{
			obj.IsUse = (bool)reader["IsUse"];
		}
//            _ID = (reader["ID"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["ID"];
//            _Name = (reader["Name"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["Name"];
//            _Note = (reader["Note"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["Note"];
//            _Value = (reader["Value"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["Value"];
//            _IsUse = (reader["IsUse"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["IsUse"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Int32 ID, string Name, string Note, string Value, bool IsUse)
        {
                     this._ID = ID;
         this._Name = Name;
         this._Note = Note;
         this._Value = Value;
         this._IsUse = IsUse;
        }
    }
}